package com.runshu.newsmartark.mvp.model;


import com.runshu.newsmartark.common.ConstantUrl;
import com.runshu.newsmartark.entity.ProductsBean;
import com.runshu.newsmartark.mvp.contract.ProductDtaContract;
import com.runshu.newsmartark.network.netbean.HttpRequestParamsBuilder;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/8/11
 * @decs：
 */

public class ProductDtaModel extends BaseModel implements ProductDtaContract.Model {

    @Override
    public void getProductInfo(String productName, String macAddress, int pageSize, int pageNum, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("productName", productName);
        builder.putParams("macAddress", macAddress);
        builder.putParams("pageSize", pageSize);
        builder.putParams("pageNum", pageNum);
        super.initDataFromServer(ConstantUrl.GET_PRO_LIST, builder.build(), ProductsBean.class, ResponseBean.RES_DATATYPE_BEANLIST, baseCallBack);

    }
}